"""
    @Author  ：思念 
    @File    ：4.CSV读取-字典.py
    @Date    ：2024/12/11 16:00 
"""
import csv

with open('../字典写入.csv') as f:
    # 创建一个reader对象，迭代时能够提取到每一行（包括表头）
    f_csv = csv.DictReader(f)
    for row in f_csv:
        # print(type(row), row)
        print(row.get("class_name"), row.get("name"), row.get("gender"), row.get("phone"), row.get("qq"))